import Vue from 'vue'
import Vuex from 'vuex'
// 1. 导入包
import createPersistedState from 'vuex-persistedstate'
Vue.use(Vuex)

export default new Vuex.Store({
  plugins: [createPersistedState()],
  state: {
    token:''
    // localStorage.getItem('token')||''
  },
  getters: {
  },
  mutations: {
    upDataToken(state,token){
      state.token=token
     // localStorage.setItem('token',token)
    }
  },
  actions: {
  },
  modules: {
  }
})
